package cn.schoolwow.starter.quickdao;

import cn.schoolwow.quickdao.transaction.Transaction;
import org.springframework.jdbc.datasource.JdbcTransactionObjectSupport;

public class QuickDAOTransactionObject extends JdbcTransactionObjectSupport {
    /**事务接口*/
    private Transaction transaction;

    @Override
    public boolean isRollbackOnly() {
        return this.hasConnectionHolder() && this.getConnectionHolder().isRollbackOnly();
    }

    public Transaction getTransaction() {
        return transaction;
    }

    public void setTransaction(Transaction transaction) {
        this.transaction = transaction;
    }
}
